# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=libvips
pkgver=8.14.2
pkgrel=1
pkgdesc="A fast image processing library with low memory needs"
arch=('loong64' 'x86_64')
license=('LGPL')
url="https://libvips.github.io/libvips/"
depends=('cfitsio' 'fftw' 'libexif' 'libgsf' 'libimagequant' 'librsvg' 'libwebp' 'libxml2' 'openexr'
         'orc' 'pango' 'libcgif')
makedepends=('gobject-introspection' 'libheif' 'libjxl' 'imagemagick' 'openslide'
             'poppler-glib' 'meson' 'gtk-doc')
optdepends=('libheif: for heif module'
            'imagemagick: for magick module'
            'openslide: for openslide module'
            'poppler-glib: for poppler module'
            'libjxl: for jxl module')
source=("https://github.com/libvips/libvips/releases/download/v$pkgver/vips-$pkgver.tar.xz")
sha512sums=('860f3b89fcaa2eaed49e253dc2b3b5c7dae5e453c506eb2ec96a3954072fcd86a4d6dafb3b00fc624c23097b947d3d6451e27d9494e7a75f1e4df5e99c771771')

build() {
  meson build vips-$pkgver \
    --prefix=/usr \
    -Dgtk_doc=true
  meson compile -C build
}

package() {
  meson install -C build --destdir="$pkgdir"
}
